﻿package mortal.game.net.command.shop
{
    import Framework.MQ.*;
    import Message.Command.*;
    import Message.Game.*;
    import mortal.game.cache.*;
    import mortal.game.mvc.*;
    import mortal.game.net.broadCast.*;
    import mortal.mvc.core.*;

    public class SecKillingUpdateCommand extends BroadCastCall
    {

        public function SecKillingUpdateCommand(param1:Object)
        {
            super(param1);
            return;
        }// end function

        override public function call(param1:MessageBlock) : void
        {
            var _loc_2:SPanicBuyMsg = null;
            var _loc_3:SPanicBuyPlayerRecordMsg = null;
            var _loc_4:SPanicBuyItemMsg = null;
            switch(param1.messageHead.command)
            {
                case EGateCommand._ECmdGatePanicBuyRefresh:
                {
                    _loc_2 = param1.messageBase as SPanicBuyMsg;
                    Cache.instance.secKilling.sPanicBuyMsg = _loc_2;
                    NetDispatcher.dispatchCmd(ServerCommand.secKillingItemListUpdate, _loc_2);
                    break;
                }
                case EGateCommand._ECmdGatePanicBuyPlayer:
                {
                    _loc_3 = param1.messageBase as SPanicBuyPlayerRecordMsg;
                    Cache.instance.secKilling.playerBuyRecord = _loc_3;
                    NetDispatcher.dispatchCmd(ServerCommand.secKillingItemRecordUpdate, null);
                    break;
                }
                case EGateCommand._ECmdGatePanicBuyItem:
                {
                    _loc_4 = param1.messageBase as SPanicBuyItemMsg;
                    Cache.instance.secKilling.resetLeftItemAmount(_loc_4);
                    NetDispatcher.dispatchCmd(ServerCommand.secKillingItemRecordUpdate, _loc_4);
                    break;
                }
                default:
                {
                    break;
                }
            }
            return;
        }// end function

    }
}
